﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Zatify.WebUI.Models
{
    public class UserProfileGeneralInfoViewModel
    {
        public string UserId { get; set; }

        [Required(ErrorMessage = "* Password required")]
        public string Password { get; set; }

        [Required(ErrorMessage = "* Confirm Password required")]
        [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }

        [Required(ErrorMessage = "Zip Code required")]
        [RegularExpression(@"^\d{5}(-\d{4})?$", ErrorMessage = "Zip code must be 5 characters length")]
        public string ZipCode { get; set; }

        [RegularExpression(@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", ErrorMessage = "Please enter a valid e-mail adress")]
        public string Email { get; set; }

        public string Phone { get; set; }

        //public FileContentResult Photo { get; set; }
        //public string PictureFileName { get; set; }
        public byte[] Picture { get; set; }
        public string PictureContentType { get; set; }
    }
}